<template>
    <div>
        <van-search v-model="value" placeholder="请输入搜索关键词" @click="bth" />
        <van-skeleton title :row="3" v-if="status" />
        <div >
            <router-link :to="'/splb/'+item">
            <van-cell-group>
                <van-cell v-for="item in qsearch":title="item.goods_name"  />
            </van-cell-group>
            </router-link>
        </div>
    </div>
</template>

<script setup>
import { ref, watch } from 'vue';
import { useRouter } from 'vue-router';
let router = useRouter('')
let bth = () => {
    router.push('/ss')
}
let status = ref(true)
setTimeout(() => {
    status.value = false
}, 1000)
let value=ref('')
import {qsearchApi} from '@/api/api'
let qsearch=ref([])
watch(value,(we)=>{
    qsearchApi(we).then(res=>{
        console.log('搜索数据',res);
        qsearch.value=res.data.message
    })
})
</script>

<style lang="scss" scoped></style>